Skip to content

fix: default to rune mode - #952

Merged
manuel3108 merged 9 commits into
sveltejs:mainfrom
sacrosanctic:equal-spider
Mar 6, 2026
Merged

manuel3108 merged 9 commits into
sveltejs:mainfrom
sacrosanctic:equal-spider

Conversation

@sacrosanctic

Copy link
Copy Markdown
Contributor

closes #944

@changeset-bot

changeset-bot Bot commented Feb 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c1f2169

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sv Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Feb 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/svelte-migrate@952
npx https://pkg.pr.new/sv@952
npx https://pkg.pr.new/@sveltejs/sv-utils@952

commit: 71d95db

@sacrosanctic

Copy link
Copy Markdown
Contributor Author

why doesnt the snapshots fail?

@jycouet

jycouet commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

why doesnt the snapshots fail?

These files are not used (I mean, not in creation)
The idea originally was to be able to start these template directly in the repo.

You should probably tune these packages/sv/src/create/shared/**/svelte.config.js

@sacrosanctic

Copy link
Copy Markdown
Contributor Author

These files are not used (I mean, not in creation)

That's confusing, can we not do that. They're not real repos.

@svelte-docs-bot

Copy link
Copy Markdown

@jycouet

jycouet commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

These files are not used (I mean, not in creation)

That's confusing, can we not do that. They're not real repos.

I'm torn on this one. Yes, they are not real repos... But it's kinda nice to be able to start it, tweak it and save the update.
At the same time, since we do a lot of replacement, it's probably not that usefull!
I think I would like also to tweak a bit the strategy and have a created hook.
This should probably be part of another PR anyway.

@sacrosanctic

sacrosanctic commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor Author

the tests pass, finally!

I'm torn on this one.

we can move that discussion to #956

@jycouet jycouet left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Maybe @manuel3108 you want to check it out as well?

@manuel3108
manuel3108 merged commit cba4b97 into sveltejs:main Mar 6, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 6, 2026
@sacrosanctic
sacrosanctic deleted the equal-spider branch March 6, 2026 20:36
adapter: adapter()
},
vitePlugin: {
dynamicCompileOptions: ({ filename }) => ({ runes: !filename.includes('node_modules') })

@JReinhold JReinhold Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is 100% correct. Right now this is saying:

"Enable runes-mode across all project files, but explicitly disable it for all files in node_modules, even those using runes".

I think it should be undefined in the node_modules case to go back to the auto-infer mode

Suggested change
dynamicCompileOptions: ({ filename }) => ({ runes: !filename.includes('node_modules') })
dynamicCompileOptions: ({ filename }) => ({ runes: filename.includes('node_modules') }) ? undefined : true

The newest release of sv is causing our CI to fail in Storybook for this exact reason, because we're using runes in @storybook/svelte and all the other packages. When I change the project's config to the above suggestion, it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should legacy mode be explained in the tutorial?

4 participants